@extends('common.admin_template')

@section('content')
    <div class="boxWidth">
        @include('common.notice_msg')
        <table class="table table-hover adminTableBg">
            <thead>
            <tr>
                <th class="col-xs-1">用户ID</th>
                <th class="col-xs-1">用户名</th>
                <th class="col-xs-1">类型</th>
                <th class="col-xs-6">内容</th>
                <th class="col-xs-2">时间</th>
                <th class="col-xs-1">操作</th>
            </tr>
            </thead>
            <tbody>
            <?php $type = Array("txt"=>"文字","img"=>"图片","voice"=>"语音") ?>
            @foreach($Lives as $live)
                <tr>
                    <th class="col-xs-1 itemTd">{{$live->user_id}}</th>
                    <th class="col-xs-1 itemTd">{{$live->name}}</th>
                    <th class="col-xs-1 itemTd">{{$type[$live->type]}}</th>
                    <th class="col-xs-6 itemTd">{{($live->type=="voice"?"https://blhd.1demo.com/":"").$live->content}}</th>
                    <th class="col-xs-2 itemTd">{{$live->created_at}}</th>
                    <th class="col-xs-1 itemTd">
                        <a href="{{url('admin/shows/live/del',['id' => $live->id])}}"><span class="redColor" id="delInput" onclick="if(!confirm('是否确认删除？'))return false">删除</span></a>
                    </th>
                </tr>
            @endforeach
            </tbody>
        </table>
        <div class="pull-right">
            {!! $Lives->render() !!}
        </div>
    </div>
@stop